package muslim30;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class PrmArticleServlet extends HttpServlet {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6246140270990607883L;

	public void doGet(HttpServletRequest request, HttpServletResponse response) 
			throws IOException {
		
		PrmDBMgr mDB = new PrmDBMgr();
		//String tblname = "ramadan_prayer_news";
		
		try {
			String json = mDB.getContentsAsJSONFromArticle();
			response.setContentType("text/html;charset=euc-kr");
			if(json != null)
				response.getWriter().print(json);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}	
}
